﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Drifting.Graphics.EffectObjects;
using Drifting.Graphics.PhysicalObjects.Vehicles;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Drifting.Scenes
{
    public class ModelCalibration : Basic
    {
        Box box_front_rear;
        Box box_left_right;
        E92Test carTest;
        E92M3 m3;

        public ModelCalibration(ref Matrix view, ref Matrix projection, GraphicsDevice device, Camera camera, Game1 game)
            : base(ref view, ref projection, device, camera, game)
        {
            camera.Camera_InitView(10, 4, 10, 0, 0, 0, (float)(Math.PI / 15), ref view, ref projection);
            carTest = new E92Test(game);
            m3 = new E92M3(game);
            box_front_rear = new Box(0.001, 0.9105f * 2, 1, Color.AliceBlue, device);
            box_left_right = new Box(10, 0.00001, 1, Color.LightCyan, device);
        }

        override public void Draw(Matrix camera, Matrix projection)
        {
            base.Draw(camera, projection);

            

            carTest.Draw(camera, projection, 0, 0, 0, MathHelper.ToRadians(30));

            m3.Draw(camera, projection, 0, 2.5f, 0, MathHelper.ToRadians(30));

            //box_front_rear.Draw(camera, projection, Matrix.CreateTranslation(1.248f, 0.5f, 0));
            //box_front_rear.Draw(camera, projection, Matrix.CreateTranslation(-1.248f, 0.5f, 0)); // wheel base = 2496

            //box_left_right.Draw(camera, projection, Matrix.CreateTranslation(0, 0.5f, -0.895f));
            //box_left_right.Draw(camera, projection, Matrix.CreateTranslation(0, 0.5f, 0.895f)); // width = 1790
        }

    }
}
